package com.eco.fanliapp.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.eco.fanliapp.entity.SyUserIntegral;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-12-24
 */
public interface SyUserIntegralMapper extends BaseMapper<SyUserIntegral> {

    /**
     * 积分查询
     * @param userId
     * @return
     */
    Integer integralQuery(@Param("userId")Long userId);

    /**
     * 修改积分
     * @param userId
     * @return
     */
    int updateBalanceByUserId(@Param("userId")Long userId);

    /**
     *
     * @param userId
     * @param integralNumber
     * @return
     */
    Integer updateBalanceFreezeByUserId(@Param("userId")Long userId, @Param("integralNumber")Integer integralNumber);
}
